// pages/index/photo.js

import photo from '../../../utils/wechatphoto'
Page({

  data: {  near_id:'',goods_id:''

  },

  onLoad: function (options) {
    console.log(options);
    
        this.setData({
          near_id:options.near_id,
          goods_id:options.goods_id
        })
  },
  wechat(){
    photo.wechatphoto(this.data.near_id,this.data.goods_id)
       
  },
  mobile(){
     photo.mobilephoto(this.data.near_id,this.data.goods_id)

  },
  rulephoto(e){
    photo.rulephoto(e.currentTarget.dataset.type,this.data.near_id,this.data.goods_id)

  },
  wechatxueshengphoto(){
    photo.wechatxueshengphoto(this.data.near_id,this.data.goods_id)
  },
  mobilephotocanvas(e){
      photo.mobilephotocanvas(this.data.near_id,this.data.goods_id,e.currentTarget.dataset.type)
  },
  mobilephotocanvas4(){
    photo.mobilephotocanvas4(this.data.near_id,this.data.goods_id)
  },
  rulephoto6(e){
    wx.navigateTo({
            url: '/pages/photoguifan/photoguifan?near_id='+this.data.near_id+"&goods_id="+this.data.goods_id+'&type='+e.currentTarget.dataset.type,
          })
           
       
     
  },
  navchusheng(){
     wx.navigateTo({
       url: '/pages/edit7/edit7?near_id='+this.data.near_id+"&goods_id="+this.data.goods_id,
     })
  },
  rulephotoquantu(e){
    wx.navigateTo({
      url: '/pages/quantu/quantu?near_id='+this.data.near_id+"&goods_id="+this.data.goods_id+'&type='+e.currentTarget.dataset.type,
    })
  },
  // 相册多图打印
   wechatall(){
     wx.navigateTo({
       url: '/pages/edit8/edit8',
     })
   },
   // 微信多图打印
   mobileall(){
    wx.navigateTo({
      url: '/pages/edit9/edit9',
    })
  },

  //2版js
  navwechat(){
    wx.navigateTo({
      url: "/pages/index/photoprint/wechat?goods_id="+this.data.goods_id+"&near_id="+this.data.near_id,
    })
  },
  navcopyphoto(){
      wx.navigateTo({
        url: "/pages/index/photoprint/copy?goods_id="+this.data.goods_id+"&near_id="+this.data.near_id,
      })
  },
 
  navcertificate(){
    wx.navigateTo({
      url: "/pages/index/photoprint/certificate?goods_id="+this.data.goods_id+"&near_id="+this.data.near_id,
    })
  },
  navbigphoto(){
    wx.navigateTo({
      url: "/pages/index/photoprint/bigphoto?goods_id="+this.data.goods_id+"&near_id="+this.data.near_id,
    })
  },
  navcanvas(){
     wx.navigateTo({
       url: '/pages/edit11/edit11?goods_id='+this.data.goods_id+"&near_id="+this.data.near_id
     })
  }


})